package team.fhhm.bigwebhomeworkservert.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.*;

@Entity
@Table(name = "employees")
public class Employee {
	
    @Id
    private String eid;

//    @OneToMany(cascade = CascadeType.REMOVE)
//    private Set<Leave> leaves = new HashSet<Leave>();

    @Column(name = "password", nullable = false)
    private String password;

    @Column(name = "name", nullable = false)
    private String name;

    @Column(name = "gender", nullable = false)
    private String gender;

    @Column(name = "phone", nullable = false)
    private String phone;

    @Column(name = "authority", nullable = false)
    private int authority;

    @Column(name = "annualleave", nullable = false)
    private int annualleave;
    
    public Employee() {
    	
    }

    public Employee(String eid, String password, String name, String gender, String phone, int authority, int annualleave) {

        this.eid = eid;
        this.password = password;
        this.name = name;
        this.gender = gender;
        this.phone = phone;
        this.authority = authority;
        this.annualleave = annualleave;
    }

    public void setEid(String eid) {
        this.eid = eid;
    }

    public String getEid() {
        return eid;
    }

//    public Set<Leave> getLeaves() {
//        return leaves;
//    }
//
//    public void setLeaves(Set<Leave> leaves) {
//        this.leaves = leaves;
//    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword() {
        return password;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getGender() {
        return gender;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return phone;
    }

    public void setAuthority(int authority) {
        this.authority = authority;
    }

    public int getAuthority() {
        return authority;
    }

    public void setAnnualleave(int annualleave) {
        this.annualleave = annualleave;
    }

    public int getAnnualleave() {
        return annualleave;
    }
}